﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EasyToHelp.Service;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace EasyToHelp.WEBAPI.Controllers
{
    [Route("api/[controller]")]
    /// <summary>
    /// Grid管理
    /// </summary>
    [EnableCors("CorsPolicy")]
    public class GridController : BaseController
    {
        private readonly IGridManage IGrid;
        public GridController(IGridManage _IGrid)
        {
            IGrid = _IGrid;
        }
        [HttpGet("GridData/{Table}/{WhereJson}")]
        public object GridData(string Table, string WhereJson = "")
        {
            return IGrid.GetGridData(Table, WhereJson);
        }
    }
}